<?php /*a:2:{s:59:"/www/wwwroot/mall/public/template/user/member/userinfo.html";i:1628903350;s:64:"/www/wwwroot/mall/public/template/user/../index/public/mlay.html";i:1624501447;}*/ ?>
<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="x-ua-compatible" content="ie=edge">
		<title>修改资料</title>
		<meta name="keywords" content="<?php echo config('app.web_site_keywords'); ?>">
		<meta name="description" content="<?php echo config('app.web_site_description'); ?>">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, shrink-to-fit=no, user-scalable=no">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		
		
		<!-- Icons -->
		<link rel="icon" href="/static/images/favicon.ico">
		<!-- END Icons -->
		
		<!-- Stylesheets -->
		<link rel="stylesheet" href="/static/libs/weui/css/weui.min.css">
		<link rel="stylesheet" href="/static/libs/weui/css/common.css?v=<?php echo config('app.asset_version'); ?>">
		<link rel="stylesheet" href="/static/css/font/iconfont.css?v=<?php echo config('app.asset_version'); ?>">
		<!-- END Stylesheets -->
		
<style></style>

	</head>
	<body id="<?php echo htmlentities(strtolower(app('request')->app())); ?>-<?php echo htmlentities(strtolower(app('request')->controller())); ?>-<?php echo htmlentities(strtolower(app('request')->action())); ?>">
		<!-- Page Container -->
		<div class="page" id="main">
			
			
<?php if($user['auth'] == '0'): ?>
<div style="position: fixed;left: 0;top: 0;padding: 0;width: 100%;" class="weui-form">
	<div class="weui-form__control-area">
		<div class="weui-cells__group weui-cells__group_form">
			<div class="weui-cells__title"><?php echo htmlentities((app('request')->param('tips') ?: "个人资料")); ?></div>
			<div style="position: relative;z-index: 10;width: 100%;" class="weui-cells weui-cells_form">
				<div class="weui-cell _getinfo">
					<div class="weui-cell__hd"><label class="weui-label">姓名</label></div>
					<div class="weui-cell__bd">
						<input class="weui-input" name="realname" placeholder="填写本人真实姓名"
							value="<?php echo htmlentities((isset($user['realname']) && ($user['realname'] !== '')?$user['realname']:'')); ?>">
					</div>
				</div>
				<div class="weui-cell _getinfo mobile">
					<div class="weui-cell__hd"><label class="weui-label">电话</label></div>
					<div class="weui-cell__bd">
						<input id="mobile" class="weui-input" name="mobile" placeholder="填写本人的电话号码" type="number"
							pattern="[0-9]*" value="<?php echo htmlentities((isset($user['mobile']) && ($user['mobile'] !== '')?$user['mobile']:'')); ?>">
					</div>
				</div>
				<div class="weui-cell">
					<div class="weui-cell__hd"><label class="weui-label">身份证</label></div>
					<div class="weui-cell__bd">
						<input class="weui-input" name="idcard" placeholder="填写18位身份证号" type="text"
							value="<?php echo htmlentities((isset($user['idcard']) && ($user['idcard'] !== '')?$user['idcard']:'')); ?>">
					</div>
				</div>
				<div class="weui-cells__title">推荐人：<?php echo htmlentities((isset($user['push_user']) && ($user['push_user'] !== '')?$user['push_user']:'')); ?></div>
				<div class="weui-cell">
					<div class="weui-cell__hd"><label class="weui-label">推荐人ID</label></div>
					<div class="weui-cell__bd">
						<input class="weui-input" name="pid" placeholder="填写推荐人的ID号" type="text"
							value="<?php echo htmlentities((isset($user['pid']) && ($user['pid'] !== '')?$user['pid']:'0')); ?>">
					</div>
				</div>
				<?php if(!(empty(app('request')->param('pid')) || ((app('request')->param('pid') instanceof \think\Collection || app('request')->param('pid') instanceof \think\Paginator ) && app('request')->param('pid')->isEmpty()))): ?>
				<p class="weui-form__tips font_red margin-tb margin-lr">
					温馨提示：推荐人信息在录入系统，通过审核后即组建为相关团队，不可擅自更改。
				</p>
				<?php endif; ?>
			</div>
		</div>
	</div>
	<div style="position: absolute;bottom: 2.5rem;width: 100%;" class="weui-form__opr-area">
		<a class="weui-btn weui-btn_primary bgv" href="javascript:" id="to-post">提交</a>
	</div>
	<div style="position: fixed;bottom: 2.5rem;width: 100%;z-index: -1;" class="weui-form__tips-area">
		<p class="weui-form__tips">
			基本信息是系统所需，请准确填写!
		</p>
	</div>
</div>
<?php else: ?>
<div class="weui-msg">
	<div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
	<div class="weui-msg__text-area">
		<h2 class="weui-msg__title">认证成功</h2>
		<p class="weui-msg__desc">如需更改，请联系客服人员！</p>
	</div>
	<div class="weui-msg__extra-area">
		<div class="weui-form-preview">
			<div class="weui-form-preview__bd">
				<div class="weui-form-preview__item">
					<label class="weui-form-preview__label">姓名</label>
					<span class="weui-form-preview__value"><?php echo htmlentities((isset($user['realname']) && ($user['realname'] !== '')?$user['realname']:'')); ?></span>
				</div>
				<div class="weui-form-preview__item">
					<label class="weui-form-preview__label">电话</label>
					<span class="weui-form-preview__value"><?php echo htmlentities((isset($user['mobile']) && ($user['mobile'] !== '')?$user['mobile']:'')); ?></span>
				</div>
				<div class="weui-form-preview__item">
					<label class="weui-form-preview__label">身份证号</label>
					<span class="weui-form-preview__value"><?php echo htmlentities((isset($user['idcard']) && ($user['idcard'] !== '')?$user['idcard']:'')); ?></span>
				</div>
				<div class="weui-form-preview__item">
					<label class="weui-form-preview__label">推荐人</label>
					<span class="weui-form-preview__value"><?php echo htmlentities((isset($user['push_user']) && ($user['push_user'] !== '')?$user['push_user']:'')); ?></span>
				</div>
			</div>
		</div>
	</div>
</div>

<?php endif; ?>

		</div>
		<!-- END Page Container -->
		<!-- FOOT -->
		
		
		<!-- Footer -->
		<!-- 工具栏 -->
		<div class="footer"></div>
		<?php if(!(empty($nav['main_nav']) || (($nav['main_nav'] instanceof \think\Collection || $nav['main_nav'] instanceof \think\Paginator ) && $nav['main_nav']->isEmpty()))): ?>
		<nav class="bar-tab weui-flex">
			<?php if(is_array($nav['main_nav']) || $nav['main_nav'] instanceof \think\Collection || $nav['main_nav'] instanceof \think\Paginator): $i = 0; $__LIST__ = $nav['main_nav'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$menu): $mod = ($i % 2 );++$i;?>
			<a class="tab-item weui-flex__item<?php if(isset($active) && $active == $menu['rel']): ?> active<?php endif; ?>" href="<?php echo htmlentities($menu['url']); ?>">
				<span class="icoimg <?php echo htmlentities($menu['css']); if(isset($active) && $active == $menu['rel']): ?>-full<?php endif; ?>"></span>
				<span class="tab-label"><?php echo htmlentities($menu['title']); ?></span>
			</a>
			<?php endforeach; endif; else: echo "" ;endif; ?>
		</nav>
		<?php endif; ?>
		<!-- Footer -->
		

		
		<ul id="Fixed">
			<li id="goTop" class="ico ico-up hidden" title="去顶部"></li>
		</ul>
		
		<!-- END FOOT-->
		<div class="hidden">
			
			<?php echo config('app.web_site_statistics'); ?>
			
		</div>
		<!--js -->
		<script src="/static/libs/weui/js/jquery.min.js"></script>
		<script src="/static/libs/weui/js/weui.min.js"></script>
		<script src="/static/libs/weui/js/common.js?<?php echo config('app.asset_version'); ?>"></script>
		
		<?php if(!(empty($jssdk) || (($jssdk instanceof \think\Collection || $jssdk instanceof \think\Paginator ) && $jssdk->isEmpty()))): ?>
		<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
		<script>
			wx.config({
				debug: false,
				appId: '<?php echo htmlentities($jssdk['appid']); ?>',
				timestamp: '<?php echo htmlentities($jssdk['timestamp']); ?>',
				nonceStr: '<?php echo htmlentities($jssdk['noncestr']); ?>',
				signature: '<?php echo htmlentities($jssdk['signature']); ?>',
				jsApiList: [
					'updateAppMessageShareData',
					'updateTimelineShareData',
					'hideMenuItems',
					'showMenuItems',
					'closeWindow',
				],
				openTagList: ['wx-open-launch-weapp']
			});
			wx.ready(function() {
				wx.updateAppMessageShareData({
					title: "<?php echo htmlentities((isset($share['title']) && ($share['title'] !== '')?$share['title']:config('app.web_site_title'))); ?>", // 分享标题
					desc: "<?php echo htmlentities((isset($share['desc']) && ($share['desc'] !== '')?$share['desc']:config('app.web_site_slogan'))); ?>", // 分享描述
					link: "<?php echo htmlentities((isset($share['url']) && ($share['url'] !== '')?$share['url']:$jssdk['url'])); ?>", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
					imgUrl: "<?php echo htmlentities((isset($share['img']) && ($share['img'] !== '')?$share['img']:app('request')->scheme() . '://' .app('request')->host() .'/static/images/share.png')); ?>", // 分享图标
					success: function() {
						// 设置成功
					}
				});
				wx.updateTimelineShareData({
					title:  "<?php echo htmlentities((isset($share['title']) && ($share['title'] !== '')?$share['title']:config('app.web_site_title'))); ?>", // 分享标题
					link: "<?php echo htmlentities((isset($share['url']) && ($share['url'] !== '')?$share['url']:$jssdk['url'])); ?>", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
					imgUrl: "<?php echo htmlentities((isset($share['img']) && ($share['img'] !== '')?$share['img']:app('request')->scheme() . '://' .app('request')->host() .'/static/images/share.png')); ?>", // 分享图标
					success: function() {
						// 设置成功
					}
				});
				<?php if(!(empty($share['hide']) || (($share['hide'] instanceof \think\Collection || $share['hide'] instanceof \think\Paginator ) && $share['hide']->isEmpty()))): ?>
				wx.hideMenuItems({
					menuList: ['menuItem:copyUrl', 'menuItem:originPage', 'menuItem:readMode', 'menuItem:openWithQQBrowser',
						'menuItem:openWithSafari', 'menuItem:share:email', 'menuItem:favorite', 'menuItem:share:qq',
						'menuItem:share:weiboApp', 'menuItem:favorite', 'menuItem:share:QZone'] // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
				});
				<?php endif; ?>
				wx.showMenuItems({
					menuList: ["menuItem:profile", "menuItem:addContact", ] // 要显示的菜单项，所有menu项见附录3
				});
			});
		</script>
		<?php endif; ?>
		
		
<script>
	$(document).ready(function() {
		$("#to-post").on("click", function() {
			var data = {
				realname: $("input[name='realname']").val(),
				mobile: $("input[name='mobile']").val(),
				idcard: $("input[name='idcard']").val(),
				address: $("input[name='address']").val(),
				pid: $("input[name='pid']").val(),
				__token__: $("input[name='__token__']").val(),
			}
			$.post('', data, function(res) {
				if (res.code == 0) {
					weui.topTips(res.msg, {
						className: 'warning'
					});
				} else {
					weui.topTips(res.msg, {
						className: 'success'
					});
					var golink = function() {
						window.location.href = res.url;
					}
					setTimeout(golink, 500);
				}
			})
		})
		$("#openid").on("click", function() {
			$.post("<?php echo url('api/index/getopenid'); ?>", '', function(res) {
				if (res.code == 0) {
					weui.topTips(res.msg, {
						className: 'warning'
					});
				} else {
					weui.topTips(res.msg, {
						className: 'success'
					});
					$("input[name='address']").val(res.data);
				}
			});
		})
	})
</script>

	</body>
</html>
